import {createBrowserRouter} from "react-router-dom";
import MainLayout from "../pages/layout/mainLayout/MainLayout";
import InterfaceList from "../pages/layout/interface/InterfaceList";
import InterfaceInfo from "../pages/layout/interface_info/InterfaceInfo";
import Page404 from "../pages/page404/Page404";
import Introduce from "../pages/layout/introduce/Introduce";
import Login from "../pages/login/Login";
import Register from "../pages/register/Register";
import User from "../pages/layout/user/User";
import Manage from "../pages/layout/manage/Manage";

const route = createBrowserRouter([
    {
        path:"/",
        element:<MainLayout></MainLayout>,
        children:[
            {
                path:"interface/list",
                element:<InterfaceList></InterfaceList>
            },
            {
                path:"interface_info/:id",
                element:<InterfaceInfo></InterfaceInfo>
            },
            {
              path:"introduce",
              element:<Introduce></Introduce>
            },
            {
              path:"user",
              element:<User></User>
            },
            {
                path:"manage",
                element:<Manage></Manage>
            },
            {
                path:"*",
                element:<Page404></Page404>
            }

        ]
    },
    {
        path:"/login",
        element:<Login></Login>
    },
    {
        path:"/register",
        element:<Register></Register>
    }
])
export default route
